package cn.csc.module.system.api.oauth2.dto;

import cn.csc.framework.common.enums.UserTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * OAuth2 访问令牌的过期时间更新
 * {@link UserTypeEnum}
 * @author liuchuang
 * @version 1.0
 * @date 2024/1/11 11:29
 * @modify
 */
@ApiModel("RPC 服务 - OAuth2 访问令牌的过期时间更新 Request DTO")
@Data
@Accessors(chain = true)
public class OAuth2AccessTokenUpdateReqDTO {

    @ApiModelProperty(value = "访问令牌", required = true, example = "tudou")
    private String accessToken;

    @ApiModelProperty(value = "访问令牌有效时间,单位s", required = true, example = "43200")
    private LocalDateTime accessTokenExpire;

    @ApiModelProperty(value = "刷新令牌", required = true, example = "haha")
    private String refreshToken;

    @ApiModelProperty(value = "刷新令牌有效时间,单位s", required = true, example = "86400")
    private LocalDateTime refreshTokenExpire;

    @ApiModelProperty(value = "用户编号", required = true, example = "10")
    private Long userId;

    @ApiModelProperty(value = "用户类型", required = true, example = "1", notes = "参见 UserTypeEnum 枚举")
    private Integer userType;

    @ApiModelProperty(value = "客户端编号", required = true, example = "yudaoyuanma")
    private String clientId;

}
